<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>javaScriptTest</title>
</head>
<body>
<head>
    <script>
        var a=function () {
            function someSetup() {
                var setup = 'done';
            }
            function actualWork() {
                alert('Worky-worky');
            }
            someSetup();
            return actualWork();
        }();

        alert(a);

    </script>
</head>
</body>
</html>